var BookmarkSystem = Class.create(//
		{
	reset : null,
	load : null,
	source : 'none',
	listen : function() {
		var self = this;
		console.log('start listening');
		subPub.subscribe({
					name : 'bookmark/created',
					callback : function(bookmark, source) {
						if (source == self.source)
							return;
						self.onRemoteAddBookmark.apply(self, arguments);
					}
				});
		subPub.subscribe({
					name : 'bookmark/updated',
					callback : function(bookmark, source) {
						if (source == self.source)
							return;
						self.onRemoteUpdateBookmark.apply(self, arguments);
					}
				});
		subPub.subscribe({
					name : 'bookmark/delete',
					callback : function(bookmark, source) {
						if (source == self.source)
							return;
						self.onRemoteRemoveBookmark
								.call(self, bookmark, source);
					}
				});
		subPub.subscribe({
					name : 'bookmark/changeUrl',
					callback : function(oldUrlMD5, newUrl, source) {
						if (source == self.source)
							return;
						self.onRemoteChangeUrl.apply(self, arguments);
					}
				});
		subPub.subscribe({
					name : 'bookmark/changeTag',
					callback : function(oldUrlMD5, tags, source) {
						if (source == self.source)
							return;
					}
				});
	},
	createLoadJob : function() {
		var self = this;
		this.loadJob = new Job(function() {
					self.load.apply(self, arguments);
				}, 10000, 15000);
		this.loadJob.postCancel = function() {
		};
	},
	scheduleLoading : function() {
		if (!this.loadJob) {
			this.createLoadJob();
		}
		return this.loadJob.replaceSchedule();
	},

	onRemoteAddBookmark : null,

	onRemoteUpdateBookmark : null,

	onRemoteRemoveBookmark : null,

	onRemoteChangeUrl : null,

	onRemoteChangeTag : null

});
